-- Ejercicio 2 Practico 2 
-- deco de 3 entradas a 8 salidas usando CASE

library IEEE;
use ieee.std_logic_1164.all;

entity ej2_case is
port (A: in std_logic_vector (2 downto 0);
      Y: out std_logic_vector (7 downto 0)
	  );
end ej2_case;

architecture ej2 of ej2_case is
begin
deco: process (A)
begin
	case A is
	when "000" => Y <= "00000001";
	when "001" => Y <= "00000010";
	when "010" => Y <= "00000100";
	when "011" => Y <= "00001000";
	when "100" => Y <= "00010000";
	when "101" => Y <= "00100000";
	when "110" => Y <= "01000000";
	when "111" => Y <= "10000000";
	when OTHERS => --;
	end case;
end process deco;
end ej2;